package com.flute.framework.autoprompt;

import java.util.List;

public class DefaultTrainingTokenBuilder implements ITrainningTokenBuilder {

	@Override
	public List<TrainningToken> build(TokenData token) {
		List<TrainningToken> tl = new CommonPriorityStrategy(token
				.getPriority().length + 1).getWordResult(token.getText());

		for (TrainningToken tt : tl) {
			for (int i = 0; i < token.getPriority().length; i++) {
				tt.getToken().updatePriority(token.getPriority()[i], i + 2);
			}

		}

		return tl;
	}

}
